﻿@section HeaderSection
{
<link href="../Content/Styles/create_poll_page.css" rel="stylesheet" type="text/css" />
}
@model RipPoll.Library.CommunityPE
  <script type="text/javascript">
      
      var toggle = true;

      $(document).ready(function () {
          $('div[id="fileuploaddiv"]').hide();

          $('a[id="gonext"]').click(function () {
              $('form#create2Form').submit();
              return false;
          });

          $('input[id="file"]').focusout(function () {
              $('div[id="fileuploaddiv"]').hide();
          });

          
          $('a[id="fileupload"]').click(function () {
              if (toggle == true) {
                  $('div[id="fileuploaddiv"]').show();
              }
              else {
                  $('div[id="fileuploaddiv"]').hide();
              }
              toggle = !toggle;
          });

          $('img[id="uploadedfile"]').click(function () {
              if (toggle == true) {
                  $('div[id="fileuploaddiv"]').show();
              }
              else {
                  $('div[id="fileuploaddiv"]').hide();
              }
              toggle = !toggle;
          });
      });

      function CallMe() {
          if (toggle == true) {
              $('div[id="fileuploaddiv"]').show();
          }
          else {
              $('div[id="fileuploaddiv"]').hide();
          }
          toggle = !toggle;
      }

  </script>

@{
    ViewBag.Title = "   Create a community";
    ViewBag.PageDivId = "headerGeneric";
    ViewBag.Margin = "margin-left:0";
} 

@section LocalHeaderSection
{
    <div id="pageTitle">    
        <span class="pageTitle">Create a Community</span>
        <div id="pageSubtitle">
            <span class="pageSubtitle">Follow your "Communities" and create a "Community"</span>
        </div>
    </div>
}

<div id="mainContent4">

  <form id="create2Form" action="create2" method="post" enctype="multipart/form-data">
  
  <div id="stepBoxMain">
  <br />
  <img src="../content/images/rippoll_icon_black.jpg" width="56" height="51" align="middle" /><span class="topText"> You're on your way to creating a community to connect people with issues that matter.</span> <br />
</div>

<div id="createPageLeft">

<div class="stepBoxText" id="stepBoxComm">
    <a href="../community/create1">1. Name your community</a>
</div>

<div class="stepBoxText" id="stepBoxComm1">
2. Enhance your community
</div>

@if(Model != null && Model.AccesslevelId != 0 ){
    <div class="stepBoxText" id="stepBoxComm">
        <a href="../community/create3">3. Who can join</a>
    </div>
}
else
{   <div class="stepBoxText" id="stepBoxComm">3. Who can join</div>
}

@if (Model != null && !string.IsNullOrEmpty(Model.Question))
{
    <div class="stepBoxText" id="stepBoxComm">
    <a href="../community/create4">4. Ask your question</a>
    </div>
}
else
{<div class="stepBoxText" id="stepBoxComm">4. Ask your question</div>
    
}
Click one of the above to go back and edit a previous step </div>

<div id="createPageRight">
 <img src="../content/images/community_step2.jpg" width="491" height="42" />
 
 <div id="inputBox">

    <div style="background: #FFC; border:2px solid #FC9; height:50px; width:550px; float:none" id="fileuploaddiv">
        <input type="file" name="file" id="file" size="50px" style="vertical-align:bottom; margin-left:60px;margin-top:10px" onchange="javascript:CallMe();" />
        <br />
    </div>
    <br />
   <div id="commImage">
    @if (Model != null && !string.IsNullOrEmpty(Model.ImagePath))
    {
        var imgPath = "../content/images/uploads/" + System.IO.Path.GetFileName(Model.ImagePath);
         <img src="@imgPath" alt="[IMAGE]" id="uploadedfile" style="position:relative;width:100px;height:77px" />
    }
    else
    {
        <a id="fileupload">Click here to upload your image</a>
        }
   </div>
<span class="topText">Upload an image. There are certain requirements we have to follow for professional sports images.</span>     <span class="redText">(<a href="#">read here</a>)<br />
     </span><span class="topText"><br />
     Please keep it clean. </span>
     <span class="redText">(<a href="#">requirements</a>)</span><br />
     <br />
     <br />
     <br />
     <a id="gonext"><img src="../content/images/go_to_step_3.jpg" alt="Click here to go to Step 2" width="200" height="28" border="0" /></a> </div>
 <br />
 <span class="viewCategory"><strong><br />
 <br />
 <br />
 <br />
 <br />
 <br />
 <br />
 Learn how to make your Community look great.</strong></span> <br />
 Read our <span class="blueHiliteText"><a href="#">recommended settings</a>.</span><br />
     <br />
     <span class="viewCategory"><strong>Still have questions?</strong></span> <span class="blueHiliteText"><a href="#">Watch this tutorial</a></span> or <span class="blueHiliteText"><a href="#">ask for help</a></span>.</div>

  <div id="stepBoxMain">
    <span class="regularText">All polls submitted will be reviewed by our internal audit dept. to make sure they’re not slanderous, malicious, derogatory and basically in poor taste.  Keep it clean.  We want our polls to be taken seriously, since they may deal with local, state, national and worldwide issues.  We strive very hard to make sure that this is a positive experience for those submitting polls and those viewing  and responding to your polls.</span>
</div>

  </form>

  </div>